<table width="100%"><tr><td width="20%">
<a href="../index.html">&lt; index</a><br />
<a href="index.html">&lt; 5. Image toolkit</a>
</td><td width="60%">
<p align="center">
=====================================<br />
5.12 Deleting an image<br />
=====================================<br />
</p></td><td width="20%">
</td></tr></table>
<style type="text/css">
.code { color:#444444; background-color:#EEEEEE;}
pre { color:#444444; background-color:#EEEEEE;}
table.param td { border : 1px solid #000000; }
th { background-color: #44BBFF; color: #FFFFFF }
table.none td { border : 0 }
</style>
You can destroy an image and release used resources with :<br/>
<p class="code"><pre>
C++ : TCODImage::~TCODImage()
C   : void TCOD_image_delete(TCOD_image_t image)
Py  : image_delete(image)
</pre></p>
<table class="param">
<tr><th>Parameter</th><th>Description</th></tr>
<tr><td>image</td><td>In the C version, the image handler, obtained with the <a href="image_load.html">load</a> function.</td></tr>
</table>
Example :<br />
<p class="code"><pre>
C++ : TCODImage *pix = new TCODImage(80,50);
      // ... use pix
      delete pix;
C   : TCOD_image_t pix = TCOD_image_new(80,50);
      /* ... use pix */
      TCOD_image_delete(pix);
Py  : pix = libtcod.image_new(80,50)
      # ... use pix
      libtcod.image_delete(pix)
</pre></p>
